<table>
	<thead class="ahead">
		<tr>
			<th colspan="8">Kinder</th>
		</tr>
	</thead>
	<tbody>
		<% if(request.kind) {%>
	   		<% request.kind.each { item -> %>
	   			<tr> 
			  		<form action="/gaeste/updatekind" method="post">
			  			<td class="middle">Name</td>
			   			<td>
			   				<input type="text" name="name" value="${item.name}"></input>
			   			</td>
			  		 	<td class="middle">Alter</td>
			   			<td>
			   				<% if(item.alter) {%>
			   					<input class="alter" type="text" name="alter" value="${item.alter}"></input>
			   				<% } else {%>
			   					<input class="alter" type="text" name="alter" ></input>
			   				<% } %>
			   			</td>
			   			<td class="middle">Zusage</td>
			   			<td>
							<select name="status">
								<% if(item?.status == 2) {%>
									<option selected="selected" value="2">Noch offen</option>
								<% } else { %>
									<option value="2">Noch offen</option>
								<% }  %>
								<% if(item?.status == 0) {%>
									<option selected="selected" value="0">Nein</option>
								<% } else { %>
									<option value="0">Nein</option>
								<% }  %>
								<% if(item.status == 1) {%>
									<option selected="selected" value="1">Ja</option>
								<% } else { %>
									<option value="1">Ja</option>
								<% }  %>
							</select>
						</td>
			   			<td>
			   				<input type="hidden" name="key" value="${com.google.appengine.api.datastore.KeyFactory.keyToString(request.gast.key)}" />
							<input type="hidden" name="kkey" value="${com.google.appengine.api.datastore.KeyFactory.keyToString(item.key)}" />
							<input class="buttonupdate" type="submit" value="" />
			   			</td>
			   		</form>
			   		<form action="/gaeste/deletekind" method="post">
			   			<td>
			   				<input type="hidden" name="key" value="${com.google.appengine.api.datastore.KeyFactory.keyToString(request.gast.key)}" />
							<input type="hidden" name="kkey" value="${com.google.appengine.api.datastore.KeyFactory.keyToString(item.key)}" />
							<input class="buttondelete" type="submit" value="" />
			   			</td>
			   		</form>
	   			</tr>
	   			
			<% } %>
	 	<% } %>
	 	<form action="/gaeste/updatekind" method="post">
	 		<tr> 
	  			<td class="middle">Name</td>
	   			<td>
	   				<input type="text" name="name" ></input>
	   			</td>
	  		 	<td class="middle">Alter</td>
	   			<td>
	   				<input class="alter" type="text" name="alter" ></input>
	   			</td>
	   			<td class="middle">Zusage</td>
	   			<td>
					<select name="status">
						<option value="2">Noch offen</option>
						<option value="0">Nein</option>
						<option value="1">Ja</option>
					</select>
				</td>
	   			<td>
	   				<input type="hidden" name="key" value="${com.google.appengine.api.datastore.KeyFactory.keyToString(request.gast.key)}" />
					<input class="buttonadd" type="submit" value="" />
	   			</td>
  			</tr>
	 	</form>
	</tbody>
</table>
<br/><br/>
<table>
	<thead class="ahead">
		<tr>
			<th colspan="6">Begleitung</th>
		</tr>
	</thead>
	<tbody>
		<% if(request.anhang) {%>
	   		<% request.anhang.each { item -> %>
	   			<tr> 
			  		<form action="/gaeste/updateanhang" method="post">
			  			<td>Name</td>
			   			<td>
			   				<input type="text" name="name" value="${item.name}"></input>
			   			</td>
			  		 	<td class="middle">Zusage</td>
			   			<td>
							<select name="status">
								<% if(item?.status == 2) {%>
									<option selected="selected" value="2">Noch offen</option>
								<% } else { %>
									<option value="2">Noch offen</option>
								<% }  %>
								<% if(item?.status == 0) {%>
									<option selected="selected" value="0">Nein</option>
								<% } else { %>
									<option value="0">Nein</option>
								<% }  %>
								<% if(item.status == 1) {%>
									<option selected="selected" value="1">Ja</option>
								<% } else { %>
									<option value="1">Ja</option>
								<% }  %>
							</select>
						</td>
			   			<td>
			   				<input type="hidden" name="key" value="${com.google.appengine.api.datastore.KeyFactory.keyToString(request.gast.key)}" />
							<input type="hidden" name="kkey" value="${com.google.appengine.api.datastore.KeyFactory.keyToString(item.key)}" />
							<input class="buttonupdate" type="submit" value="" />
			   			</td>
			   		</form>
			   		<form action="/gaeste/deleteanhang" method="post">
			   			<td>
			   				<input type="hidden" name="key" value="${com.google.appengine.api.datastore.KeyFactory.keyToString(request.gast.key)}" />
							<input type="hidden" name="kkey" value="${com.google.appengine.api.datastore.KeyFactory.keyToString(item.key)}" />
							<input class="buttondelete" type="submit" value="" />
			   			</td>
			   		</form>
	   			</tr>
	   			
			<% } %>
	 	<% } %>
	 	<form action="/gaeste/updateanhang" method="post">
	 		<tr> 
	  			<td>Name</td>
	   			<td>
	   				<input type="text" name="name" ></input>
	   			</td>
	   			<td class="middle">Zusage</td>
	   			<td>
					<select name="status">
						<option value="2">Noch offen</option>
						<option value="0">Nein</option>
						<option value="1">Ja</option>
					</select>
				</td>
	  		 	<td>
	   				<input type="hidden" name="key" value="${com.google.appengine.api.datastore.KeyFactory.keyToString(request.gast.key)}" />
					<input class="buttonadd" type="submit" value="" />
	   			</td>
  			</tr>
	 	</form>
	</tbody>
</table>